
<?php echo $this->Html->css('admin/admin_members_index'); ?>



<div class="wrapper" style="padding: 5px;" id="content-row">

    <div class="row">
        <div class="col-lg-3 desktop-view-left">
            <div class="panel " id="table-view" data-url="<?php echo $this->Html->url(array('action' => 'table_view', 'recent')); ?>">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-md-4">
                            <input id="checkall" type="checkbox" style="margin-left: 2px; margin-right: 5px;"/>

                            <div class="btn-group">

                                <button class="btn dropdown-toggle btn-xs btn-white sort_btn" data-toggle="dropdown" title="Sort List">
                                    <i class="fa fa-arrow-down"></i>
                                    <span class="caret"></span>
                                </button>

                                <ul class="dropdown-menu">
                                    <li><a id="sort-menu-recent" class="sort_menu" href="<?php echo $this->Html->url(array('action' => 'table_view', 'recent')); ?>"><i class="fa fa-arrow-down"></i> Recent First</a></li>
                                    <li><a id="sort-menu-alpha" class="sort_menu" href="<?php echo $this->Html->url(array('action' => 'table_view', 'alpha')); ?>"><i class="fa fa-list-ol"></i> Alphabetical</a></li>
                                </ul>
                            </div>
                        </div>

                        <div class='col-md-8'>

                            <div class="btn-group">
                                <button class="btn btn-white dropdown-toggle" data-toggle="dropdown" title="Add New Data">
                                    <i class="fa fa-cog"></i> Add
                                    <span class="caret"></span>
                                </button>

                                <ul class="dropdown-menu">
                                    <li><a id="add-member-menu" class="add_menu" title="Record New Member" href="<?php echo $this->Html->url(array('action' => 'profile_basic')); ?>"><i class="fa fa-user"></i> New Member</a></li>
                                    <li><a id="add-visitor-menu" class="add_menu" title="Record New Visitor" href="<?php echo $this->Html->url(array('action' => 'profile_basic', 'visitor')); ?>"><i class="fa fa-user"></i> New Visitor</a></li>
                                </ul>
                            </div>

                            <div class="btn-group">

                                <button class="btn btn-white dropdown-toggle" data-toggle="dropdown" title="Bulk Actions For Multiple Selected Records">
                                    <i class="fa fa-cog"></i> Actions
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu pull-right">
                                    <li><a id="delete-menu" href="<?php echo $this->Html->url(array('controller' => 'organisation', 'action' => 'removeMember')); ?>"><i class="fa fa-trash"></i> Delete</a></li>
                                    <li class="divider"></li>
                                    <li><a id="upload-menu" href="#"><i class="fa fa-upload-alt"></i> Upload Images</a></li>
                                    <li class="divider"></li>
                                    <li><a href="#"><i class="fa fa-download-alt"></i> Import Data</a></li>
                                    <!--<li><a href="#"><i class="fa fa-user"></i> Change Group ...</a></li>
                                    <li><a href="#"><i class="fa fa-move"></i> Move To ...</a></li>-->
                                </ul>
                            </div>
                        </div>
                    </div>


                </div>

                <div class="panel-body" style="padding: 1px;" id="list-table-content">
                    <div id='table_view' class="row-fluid scroll-y">
                        <div class='scroll-block'>
                            <table id = "list-table" class = "table table-condensed table-striped">
                                <tbody>

                                </tbody>
                            </table>
                        </div>
                    </div>
                    <?php //echo $this->element('members/admin/table_view', array('members' => $members)); ?>
                </div>

                <div class="panel-footer">
                    <!--<span>Page </span>
                    <input type="text" class="input" value="1" />
                    <span>/ 30</span>

                    <span class="pull-right btn-group">                                    
                        <a href="#" class="btn btn-small disabled" title="First"><i class="fa fa-double-angle-left"></i></a> 
                        <a href="#" class="btn btn-small disabled" title="Prev"><i class="fa fa-angle-left"></i></a>
                        <a href="#" class="btn btn-small" title="Next"><i class="fa fa-angle-right"></i></a>
                        <a href="#" class="btn btn-small" title="Last"><i class="fa fa-double-angle-right"></i></a>
                    </span>-->
                    <div class="row">
                        <div class="col-lg-12"> 
                            <form id="member-search-form" action="<?php echo $this->Html->url(array('controller' => 'organisation', 'action' => 'find_member')); ?>" class="form-horizontal">
                                <button type="reset" id="clear-btn" class="btn btn-white pull-right m-l-sm"><i class="fa fa-remove"></i> Clear</button>
                                <button type="submit" id="search-btn" class="btn btn-white pull-right m-l-sm"><i class="fa fa-search"></i></button>
                                <input type="text" id="member-search" class="form-control input-s-sm pull-right">
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-lg-9 desktop-view-right">
            <div class="panel desktop-view-right-panel" id="profile-view">
                <div class="panel-heading panel-heading-right">
                    <div class="row">
                        <div class="col-lg-6" id="profile-view-title">
                            <p style="font-weight: bold; font-size: 16px;">&nbsp;</p>
                        </div>

                        <div class="col-lg-6" id="edit_btn_group">
                            <div class="btn-group pull-right">
                                <button class="btn btn-info" id="edit_btn" data-url="<?php echo $this->Html->url(array('action' => 'profile_basic')); ?>"><i class="fa fa-edit"></i> Edit Profile</button>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel-body panel-body-right" id="profile_view_pane">
                    <div class="content">
                        <?php //echo $this->element('members/admin/profile_view'); ?>
                    </div>

                    <div id="loader_overlay">
                        <?php echo $this->Html->image('core/ajax-loader.gif'); ?>
                    </div>
                </div>

                <div style="display: none;" id="editor_view">
                    <div class="content">
                        <?php //echo $this->element('members/admin/profile_view'); ?>
                    </div>
                </div>

                <!-- Modal -->
                <div id="profile_editor" class="modal hide fade" style="width: 800px; margin-left: -425px; top: 5%;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 id="myModalLabel">Profile Editor</h4>
                    </div>
                    <div class="modal-body">
                        <p>One fine body…</p>
                    </div>
                    <div class="modal-footer">
                        <button class="btn btn-primary" id="save-changes">Save Changes</button>
                        <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
                    </div>
                </div>


            </div>
        </div>
    </div>
</div>




<input type="hidden" id="member_list_url" value="<?php echo $this->Html->url(array('controller' => 'members', 'action' => 'listMembers')); ?>" />
<input type="hidden" id="total_members" value="<?php echo $total_members; ?>" />


<?php echo $this->element('members/admin/images_view'); ?>

<?php
echo $this->Html->script('app/controllers/members_controller.js');
echo $this->Html->script('app/views/members/index.js');
